 <#include "../common/com.html"/> <@layout>

<!-- ace styles -->
<link rel="stylesheet" href="${ctx}/static/assets/css/ace.min.css" />
<script src="${ctx}/static/inc/platform/js/ajax.js"></script>

<script type="text/javascript">
	/**
	 * 办理
	 */
	function update() {
		$("#id").attr("value", $("#ids").val());
		$("#cards").attr("value", $("#carda").val());
		var card = $("#carda").val();
		if (confirm("确定要重新办理吗？")) {
			var url = '${ctx}/hygl/updatehyk';
			$('#myform').form(
					'submit',
					{
						url : url,
						onSubmit : function() {
							return $(this).form('validate');
						},
						success : function(data) {
							if (data == "1") {
								alert("办理成功！");
								send_request_update(
										'${ctx}/hygl/gethy?search_EQ_card='
												+ card, "", divs);
								$("#card").attr("value", "");
							} else if (data == "0")  {
								alert("办理失败！");
							} else {
								alert(data);

							}
							//	window.location.href = ' ${ctx}/hygl';
						}
					});

		}
	}
</script>
<div class="page-content">
	<div class="page-header" style="height: 15px">会员卡挂失办理</div>
	<!-- /.page-header -->
	<div class="row-fluid">
		<div class="span12 ">

			<div class="widget-main alert-info">
				请输入会员信息
				<input id="card" name="card" type="text"
					style="min-height: 24px;" />
				<button id="search_btn" onclick="return false;"
					class="btn btn-info btn-small" onclick="queryModel()">查询</button>
			</div>
			<div id="divs"></div>



		</div>
		<form class="form-inline" id="myform">
			<input id="id" name="id" type="hidden" style="min-height: 24px;"
				value="${(m.id)!}" /> <input id="cards" name="cards" type="hidden"
				style="min-height: 24px;" />
		</form>

	</div>
</div>
</div>
</body>

<script>
	$("#search_btn").click(
			function() {
				var card = $("#card").val();
				send_request_update('${ctx}/hygl/gethy?search_EQ_card=' + card,
						"", divs);

			});

	//转json
	function JSONstringify(Json) {
		if ($.browser.msie) {
			if ($.browser.version == "7.0" || $.browser.version == "6.0") {
				var result = jQuery.parseJSON(Json);
			} else {
				var result = JSON.stringify(Json);
			}
		} else {
			var result = JSON.stringify(Json);
		}
		return result;
	}
	
	// 绑定回车事件
	document.onkeydown = function(e)
	{
	    var e = window.event   ?   window.event   :   e; 
	    if(e.keyCode == 13){
	    	var card = $("#card").val();
			send_request_update('${ctx}/hygl/gethy?search_EQ_card=' + card,
					"", divs);
	    }
	}
</script>
</@layout>
